<script setup lang="ts">
// import { ref } from 'vue'
import { debounceRef } from '../utils/debounceRef.ts'
const text = debounceRef('123', 1000)
// const text2 = ref('123')

</script>
<template>
  <div class="input-container">
    <h2>对响应数据进行防抖 简化代码</h2>
    <input class="border-2 border-blue-100" v-model="text" /> 
    <br>
    <p >{{ text }}</p>
  </div>
</template>
<style scoped lang="scss">
.input-container {
  width: 100%;
  margin: 1em auto;
  input {
    width: 100%;
    padding: 0.5em;
  }

}
</style>